public var cursor:Texture2D;
public var cursorPos: Vector3;

public var MTexN_1: Texture2D;
public var MTexN_2: Texture2D;
public var MTexN_3: Texture2D;

public var MTexO_1: Texture2D;
public var MTexO_2: Texture2D;
public var MTexO_3: Texture2D;

public var logoText: Texture2D;

private var overArr: boolean[];


function Start() {
	Screen.showCursor = false;
	overArr  = new boolean[4];
	overArr[1] = true;
	overArr[2] = true;
	overArr[3] = true;
}

function OnGUI() {
	cursorPos = Input.mousePosition;
	cursorPos.x -= 12;
	cursorPos.y = Screen.height - cursorPos.y;
	
	GUI.DrawTexture(Rect(0,0,300,225),logoText);
	
	if(Rect(10, Screen.height - 160 ,170,40).Contains(cursorPos)){
		GUI.DrawTexture(Rect(10, Screen.height - 160,170,40), MTexO_1);
		if(overArr[1] == true){
			audio.Play();
			overArr[1] = false;
		}
		if(Input.GetMouseButton(0)){
			CoreApplication.setNewLevel(3);
			Application.LoadLevel(1);
		}
	}else{
		GUI.DrawTexture(Rect(10, Screen.height - 160,170,40), MTexN_1);
		overArr[1] = true;
	}
	
	
	if(Rect(10, Screen.height - 100,170,40).Contains(cursorPos)){
		GUI.DrawTexture(Rect(10, Screen.height - 100,170,40), MTexO_2);
		if(overArr[2]){
			audio.Play();
			overArr[2] = false;
		}
	}else{	
		GUI.DrawTexture(Rect(10, Screen.height - 100,170,40), MTexN_2);
		overArr[2] = true;
	}
	
	if(Rect(10, Screen.height - 40,100,40).Contains(cursorPos)){
		GUI.DrawTexture(Rect(10, Screen.height - 40,100,40), MTexO_3);
		if(overArr[3]){
			audio.Play();
			overArr[3] = false;
		}
	}else{
		GUI.DrawTexture(Rect(10, Screen.height - 40,100,40), MTexN_3);
		overArr[3] = true;
	}
	
	cursorPos.y = cursorPos.y-12;
	GUI.DrawTexture(Rect(cursorPos.x,cursorPos.y,24,24),cursor);
}